Open
Conversation
oldgalileo
requested changes
Jan 7, 2018
Contributor
oldgalileo
left a comment
There was a problem hiding this comment.
Please test and ensure that the logging format is the same. Then will merge.
Contributor
Author
|
Logging will not be the same, that's the point. This changes the logging. |
Contributor
Author
|
can one of you guys that's merging all my PRs from literally two years ago glance at this? this is a legitimate bug. |
Contributor
Author
|
X calls Y calls LogKitten.warn. LogKitten says "Y had a warning" this is a giant foot-gun and could cause very hard to debug incorrect logging. there is one example currently. LogKitten.logMessage REALLY SHOULD be a private method. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Leaving
logMessage(Object message, KittenLevel level, boolean override)as public introduces a subtle bug.This method gets the fifth item in the stack trace. Normally, a class calls, for example
void f(Object message) { // Log fatal message, which then callsLogKitten.logMessage(message, KittenLevel.FATAL, false);. This results in the fifth item in the stack trace being, as expected, the function that calls LogKitten.However, if
logMessagewere public, the fifth item in the stack trace would be the function that calls the function that calls logkitten, resulting in incorrect logging.The levels of indirection in calling LogKitten must be standardized, otherwise logging of what function called LogKitten will be inconsistent.